Skip to content

feat: add native Claude Code Plugin with auto-discovery Skill#19

Merged
costiash merged 7 commits intomainfrom
feat/plugin-modernization
Feb 28, 2026
Merged

feat: add native Claude Code Plugin with auto-discovery Skill#19
costiash merged 7 commits intomainfrom
feat/plugin-modernization

Conversation

@costiash
Copy link
Owner

Purpose

Transform claude-code-docs from a shell-script-only tool into a native Claude Code Plugin. This gives users a zero-dependency installation path, an auto-discovery Skill that proactively searches docs without requiring /docs, and session-start auto-updates.

What Changed

New: Plugin Structure (plugin/)

File Purpose
plugin/.claude-plugin/plugin.json Plugin metadata (v0.6.0)
plugin/commands/docs.md /docs slash command — AI-powered intent classification, scoped search, synthesis
plugin/skills/claude-docs/SKILL.md Auto-discovery Skill — Claude reads docs automatically for Claude-related questions
plugin/skills/claude-docs/manifest-reference.md 11-category reference table for scoped search routing
plugin/hooks/hooks.json + sync-docs.sh SessionStart hook — clones or pulls docs on every session
.claude-plugin/marketplace.json Marketplace registration for costiash/claude-code-docs

Updated: Existing Files

File Change
README.md Rewritten — plugin-first install, value comparison table, auto-discovery highlight
CLAUDE.md Added plugin to repo structure/key files, fixed category labels (6 → 11), fixed broken docs.claude.com URLs in examples
CHANGELOG.md Added v0.6.0 entry
.gitignore Added eval workspace + .env

Key Fixes

  • URL mapping rules: Corrected filename-to-URL conversion in all plugin instruction files
    • claude-code__<page>.mdhttps://code.claude.com/docs/en/<page>
    • docs__en__<section>__<page>.mdhttps://platform.claude.com/en/docs/<section>/<page>
  • Broken domain references: Eliminated all docs.anthropic.com and docs.claude.com citations (these domains are dead/wrong)
  • CLAUDE.md example URLs: Fixed docs.claude.complatform.claude.com throughout

Why This Matters

Eval results (6 evals, with-skill vs without-skill):

Metric With Skill Without Skill
Pass rate 100% (22/22 assertions) 77% (17/22)
URL correctness 100% 40% (cites broken domains)
File discovery 100% 100%
Synthesis quality 100% 100%

The skill's primary value is URL mapping guidance. Without the skill, Claude consistently generates plausible-looking but broken citation URLs (docs.anthropic.com, docs.claude.com). With the skill, every URL is correct.

Plugin vs Script Install

Feature Plugin Install Script Install
Dependencies None git, jq, curl, Python 3.9+ optional
Auto-updates Every session (hook) Manual (/docs -t)
Auto-discovery Skill triggers automatically Only via /docs command
/docs command Yes Yes

Test Plan

  • All 303 existing tests pass (no regressions)
  • 6 skill quality evals pass at 100% with-skill
  • URL mapping produces correct domains for both claude-code__ and docs__en__ files
  • No broken domain references in any plugin instruction file
  • .gitignore excludes eval workspace and .env
  • Plan documents untracked (already gitignored)
  • Plugin installation via /install-plugin costiash/claude-code-docs verified locally
  • SessionStart hook clones docs on first run, pulls on subsequent runs

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant